package com.ad2campaign.engine.rest;

import java.util.List;

import com.ad2campaign.engine.db.dao.NodeDao;
import com.ad2campaign.engine.db.model.Node;
/*
 * This is a implementation of nodes loader.
 * It loads node from sql database and  depends on nodeDao Class. 
 * Yes this class is thread safe
 * */
public class SQLNodesLoader implements NodesLoader
{

	private NodeDao nodeDao;
	
	public NodeDao getNodeDao() {
		return nodeDao;
	}

	public void setNodeDao(NodeDao nodeDao) {
		this.nodeDao = nodeDao;
	}

	@Override
	public List<Node> loadNodes() 
	{
		return nodeDao.getNodes();
	}

}
